/**
 * @file    Expression classname is undefined on line 2, column 15 in Templates/Classes/Class.java.
 * @author  Haseeb Yousaf
 * @see     LICENSE (MIT style license file)
 * @version 1.0
 * @date    Nov 29, 2011 1:12:39 PM
 */
package carrello.impl.controller.administrator;

import carrello.model.association.AssociationFactory;
import carrello.model.association.CategoryAssociation;
import static carrello.util.EntityManagerUtil.getEntityManager;

public class CategoryAssociationCTRL {  
    public CategoryAssociationCTRL() {}
    
    public void addAssociation(int source, int destination, String name)
    {
        CategoryAssociation ca = AssociationFactory.createCategoryAssociation(source, destination, name);
        getEntityManager().beginUnitOfWork();
        getEntityManager().store(ca);
        getEntityManager().endUnitOfWork();
    } // AddAssociation
} //CategoryAssociationCTRL
